/*************************************************************************
 * File Name:    C.cc
 * Author:       zero91
 * Mail:         jianzhang9102@gmail.com
 * Created Time: Tue 08 Oct 2013 10:34:35 PM CST
 * 
 * Description:  http://codeforces.com/contest/280/problem/C
 ************************************************************************/

#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <functional>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <iomanip>

using namespace std;

#define MAXN 100010

struct edge_node {
    int v, next;
};

struct edge_node edge[MAXN << 1];
int head[MAXN], father[MAXN];
int edge_cnt;
double ans;

void
add_edge(int u, int v)
{
    edge[edge_cnt].v = v;
    edge[edge_cnt].next = head[u];
    head[u] = edge_cnt++;

    edge[edge_cnt].v = u;
    edge[edge_cnt].next = head[v];
    head[v] = edge_cnt++;
}

void
dfs(int root, int depth)
{
    ans += 1.0 / depth;

    for (int i = head[root]; i != -1; i = edge[i].next) {
        if (father[root] == edge[i].v) continue;

        father[edge[i].v] = root;
        dfs(edge[i].v, depth + 1);
    }
}

int
main(int argc, char *argv[])
{
    std::ios_base::sync_with_stdio(false);

    int n, u, v;

    while (cin >> n) {
        memset(head, -1, sizeof(head));
        memset(father, -1, sizeof(father));
        edge_cnt = 0;

        while (--n) {
            cin >> u >> v;
            add_edge(u, v);
        }
        ans = 0.0;
        dfs(1, 1);
        cout << setprecision(10) << ans << endl;
    }

    return 0;
}
